Display of protected tickets
When an event or show has the TicketShield functionality enabled, tickets must be displayed using menta's secure interface. It is crucial to adapt all access points where users view tickets to ensure proper protection.
TicketShield Process:
Ticket Replacement: Instead of displaying the ticket in PDF format or a static view, replace it with a secure URL provided by menta. This URL redirects to a secure view of the ticket, which includes a locked QR code and its corresponding status and actions.
Locking and Unlocking: menta locks QR codes for a specified period (e.g., up to 3 hours before the event starts). You can adjust this period from the menta dashboard. Once unlocked, the ticket will be available in the menta interface, and the user will receive a notification email. It is recommended to include the PDF version of the ticket in this email to enhance the final user's experience.
Ticket View URL
The ticket view URL in menta should be used in all instances where the user can access ticket viewing. These may include:
- The purchase confirmation page;
- The "My Tickets" section of your platform;
- Purchase confirmation emails;
- Among others.
To create this link, you will need to provide us with certain information about the tickets.
- Python
- Java
- PHP
import requests
ticket_id = "YOUR_TICKET_ID"
url = f"https://api.mentatickets.com/v1/tickets/{ticket_id}/url"
api_key = "YOUR_API_KEY"
headers = {"Authorization": api_key}
response = requests.get(url, headers=headers)
print(response.json())
Python's response
{
'status': 200,
'data': 'https://qrlink.mentatickets.com/es/...',
'errors': None
}
import okhttp3.*;
import java.io.IOException;
OkHttpClient client = new OkHttpClient();
String apiVersion = "v1";
String ticketId = "YOUR_TICKET_ID";
String url = "https://api.mentatickets.com/v1/tickets/" + ticketId + "/url";
Request request = new Request.Builder()
.url(url)
.addHeader("Authorization", "YOUR_API_KEY")
.get()
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println(response.body().string());
} catch (IOException e) {
e.printStackTrace();
}
Java's response
{
"status": 200,
"data": "https://qrlink.mentatickets.com/es/...",
"errors": []
}
<?php
$ticket_id = "YOUR_TICKET_ID";
$url = "https://api.mentatickets.com/v1/tickets/{$ticket_id}/url";
$api_key = "YOUR_API_KEY";
$headers = array("Authorization: {$api_key}");
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$response_data = json_decode($response, true);
print_r($response_data);
?>
PHP's response
Array
(
[status] => 200
[data] => https://qrlink.mentatickets.com/es/...
[errors] => Array
(
[0] =>
)
)
TicketShield Webhook activated/deactivated
Replacing traditional tickets with the menta ticket URL should be done conditionally on their platform by listening for TicketShield menta Webhooks activated / TicketShield deactivated.
curl --location 'This webhook will be sent to your platform exposed endpoint' \
--data '{
"family": "ticketShield",
"action": "ticketShield.updated",
"data": {
"status": true,
"eventId": "YOUR_PLATFORM_EVENT_ID",
"showId": "YOUR_PLATFORM_SHOW_ID",
}
}'
curl --location 'This webhook will be sent to your platform exposed endpoint' \
--data '{
"family": "ticketShield",
"action": "ticketShield.updated",
"data": {
"status": false,
"eventId": "YOUR_PLATFORM_EVENT_ID",
"showId": "YOUR_PLATFORM_SHOW_ID",
}
}'
Example of Application:
If an event has TicketShield activated, the "My Tickets" section on your platform and the purchase confirmation email should display a button directing users to view the QR code on menta, using menta's ticket URL.
Conversely, if the event has TicketShield deactivated, the "My Tickets" section on your platform and the purchase confirmation email should display the ticket in its original form, as it was before integrating with menta.